{extend name="property/public/insidePageBase" /}
{block name="title"}编辑角色{/block}
{block name="css"}
{__BLOCK__}
<style>
    .df { display: flex; }
    .fx1 { flex: 1; }
</style>
{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form layui-form-pane">
            <div class="layui-form-item" pane="">
                <label class="layui-form-label required">启用状态</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_show" value="1" title="开启" {if isset($info['is_show']) && $info['is_show'] == 1}checked{/if} />
                    <input type="radio" name="is_show" value="2" title="禁用" {if isset($info['is_show']) && $info['is_show'] == 2}checked{/if} />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" value="{$info['name']??''}" lay-verify="require" autocomplete="off" placeholder="请输入角色名称" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea id="content" name="remark" placeholder="请输入备注说明" class="layui-textarea">{$info['remark']??''}</textarea>
                </div>
            </div>
            <div class="layui-form-item df">
                <label class="layui-form-label">权限选择</label>
                <div id="treeCheck"></div>
                <div class="fx1">
                    <fieldset class="" style="display: none;"></fieldset>
                </div>
            </div>

            <div class="layui-form-item layui-hide">
                <button class="layui-btn" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form,layer = layui.layer,$ = layui.$;
        var tree = layui.tree,layer = layui.layer ,util = layui.util
            //模拟数据2
            ,data2 = {:json_encode($authData)};
        //开启复选框
        tree.render({
            elem: '#treeCheck'
            ,id:'treeCheck'
            ,data: data2
            ,showCheckbox: true
        });
    });
</script>
{/block}